<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript">
	$(function(){
		$('.buy .defray dd p label').click(function(){
			$('.buy .defray dd p').find('.masker').removeClass('active');
			$(this).parent().parent().find('.masker').addClass('active');
		})
	})
	function gotoPay(){
		if($('#payment_weixin').is(":checked")){
			alert('going to weixin pay');
			$('#goto_pay').submit();
		}else{
			$('#goto_pay').submit();
		}
		//$('#goto_pay').submit();
	}
</script>
<div id="page-cashier">
	<div class="page-main margin10">
		<form action="<?php echo url('app=cashier&act=goto_pay&order_id=' . $this->_var['order']['order_id']. ''); ?>" method="POST" id="goto_pay">
			<div class="success-anounce">
				<div class="anounce-txt">
					<h4>订单提交成功！</h4>
					<h3>订单号&nbsp;:&nbsp;<?php echo $this->_var['order']['order_sn']; ?><br />订单总价&nbsp;:&nbsp;<?php echo price_format($this->_var['order']['order_amount']); ?></h3>
					<p>您可以在用户中心中的我的订单查看该订单</p>
				</div>
			</div>
			<div class="buy">
				<h3>选择支付方式并付款</h3>
				<dl class="defray mb10">
					<?php $_from = $this->_var['payments']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'payment');if (count($_from)):
    foreach ($_from AS $this->_var['payment']):
?>
					<dd class="webkit-box pt10 pb10">
						<p style="-webkit-box-flex: 1.0;">
							<label for="payment_<?php echo $this->_var['payment']['payment_code']; ?>"><img src="<?php echo $this->_var['site_url']; ?>/includes/payments/<?php echo $this->_var['payment']['payment_code']; ?>/logo.gif" width="125" height="47" /></label>
						</p>
                        <p class="radio mt10 relative">
							<input id="payment_<?php echo $this->_var['payment']['payment_code']; ?>" type="radio" name="payment_id" value="<?php echo $this->_var['payment']['payment_id']; ?>" />
                            <label for="payment_<?php echo $this->_var['payment']['payment_code']; ?>" class="masker absolute"></label>
						</p>
					</dd>
                    <?php if ($this->_var['payment']['payment_desc']): ?><!-- <p class="explain mt5 mb5"><?php echo htmlspecialchars($this->_var['payment']['payment_desc']); ?></p> --><?php endif; ?>
					<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
					<!-- <dd class="webkit-box pt10 pb10">
						<p style="-webkit-box-flex: 1.0;">
							<label for="payment_weixin"><img src="<?php echo $this->_var['site_url']; ?>/includes/payments/weixin/logo-wechat.png" width="125" height="47" /></label>
						</p>
                        <p class="radio mt10 relative">
							<input id="payment_weixin" type="radio" name="payment_id" value="101" checked />
                            <label for="payment_weixin" class="masker absolute active"></label>
						</p>
					</dd> -->
				</dl>
			</div>
			<div class="chashier-btn mt20">
				<p> <a href="javascript:gotoPay();" class="btn1">确认支付</a> </p>
			</div>
		</form>
	</div>
</div>
<?php echo $this->fetch('footer.html'); ?>